<template>
  <!--会签管理-我的提交列表-劳务结算详情弹窗-->
    <j-modal
      :title="title"
      :width="width"
      :visible="visible"
      switchFullscreen
      @ok="privacyDialogShow=true"

      @cancel="handleCancel"
      :cancelButtonProps="{ class:{'jee-hidden': disableSubmit1} }"
      :okButtonProps="{ class:{'jee-hidden': disableSubmit1} }"
      okText="提交"
      >
      <!-- <a-popconfirm confirmText="确定"
          cancelText="取消"
          @cancel="cancelPrivacy"
          @confirm="confirmPrivacy" :disabled="privacyDialogShow"  title="确定提交吗？" >

      </a-popconfirm> -->
      <wt-laowuxiang-form ref="realForm"  :disabled="disableSubmit"></wt-laowuxiang-form>
    </j-modal>
  </template>

  <script>

    import WtLaowuxiangForm from './WtLaowuxiangForm'

    export default {
      name: 'WtShenpiModal',

      components: {
        WtLaowuxiangForm
      },
      data () {
        return {
          title:'',
          width:1000,
          visible: false,
          disableSubmit: false,
          disableSubmit1: true,
          privacyDialogShow:false,
        }
      },
      methods: {
        confirmPrivacy(){
        // console.log('同意了用户协议')
        // console.log(this.privacyDialogShow)l
        this.privacyDialogShow = false
        // console.log(this.privacyDialogShow)

      },
      cancelPrivacy(){
        // console.log('拒绝了用户协议')
        this.privacyDialogShow=false
      },
        add () {
          this.visible=true
          this.$nextTick(()=>{
            this.$refs.realForm.add();
          })
        },
        edit (record) {
          this.visible=true
          this.$nextTick(()=>{
            this.$refs.realForm.edit(record);
            this.disableSubmit = true;
          })
        },
        close () {
          this.$emit('close');
          this.visible = false;
        },
        handleOk () {
          // this.$refs.cexiao.edit()
        },
        submitCallback(){
          this.$emit('ok');
          this.visible = true;
        },
        handleCancel () {
         this.close()
        }
      }
    }
  </script>